﻿using Umbraco.Framework;
using Umbraco.Framework.Persistence.Model.Attribution.MetaData;
using Umbraco.Framework.Persistence.Model.Constants.AttributeDefinitions;
using WebGarden.Hive.Providers.Products.Schema.Model.AttributeDefinitions;

namespace WebGarden.Hive.Providers.Products.Schema.Model
{
	public class ProductSchema : EntitySchema
	{
		public const string SchemaAlias = "wg-product-schema";

		/// <summary>
		/// Define the schema of my product by adding an attribute definition for each product attribute
		/// </summary>
		public ProductSchema()
			: base(SchemaAlias, "A Web Garden Product")
		{
			// This is used in the Model/Repository.cs class
			Id = new HiveId(1);

			// Add an attribute definition for each attribute of your object
			// (can correspond to a column in your datasource)
			AttributeDefinitions.Add(new DescriptionAttributeDefinition());
			AttributeDefinitions.Add(new PriceAttributeDefinition());
		}
	}
}
